package org.dxy.domain.event.material;

import org.dxy.domain.event.AggregateTypeEnum;
import org.dxy.domain.event.DomainEvent;

/**
 * 物料已启用事件
 * 原先停用或新建物料正式可使用时触发
 * @author dxy
 * @createTime 2025/9/7
 */
public record MaterialEnabledEvent(
        /**
         * 物料ID
         */
        Long materialId
) implements DomainEvent {
    
    @Override
    public Long aggregateId() {
        return materialId;
    }
    
    @Override
    public String aggregateType() {
        return AggregateTypeEnum.MATERIAL.getKey();
    }
    
    @Override
    public String eventType() {
        return MaterialEventTypeEnum.ENABLED.getKey();
    }
}